num = eval(input("请输入一个数字："))

for i in range(1,num+1):
    for j in range(1,num-i+1):
        print(format("","2s"), end=' ')
    for j in range(i,1,-1):
        print(format(j,"2d"), end=' ')
    for j in range(1,i+1):
        print(format(j,"2d"),end=' ')

    print()